package cn.wolfcode;

import org.apache.commons.beanutils.BeanUtils;
import org.junit.Test;

import java.lang.reflect.InvocationTargetException;

public class App {
    @Test
    public void test(){
        User user = new User(1l,"Humie","qq@.com","sdsds",new Person("来了老弟",13));
        Employee employee = new Employee();
        System.out.println(employee);
        System.out.println(user);
        System.out.println("---------------------------");
        try {
            BeanUtils.copyProperties(employee,user);
        } catch (IllegalAccessException e) {
            e.printStackTrace();
        } catch (InvocationTargetException e) {
            e.printStackTrace();
        }
        System.out.println("------------");
        System.out.println(employee);
        System.out.println(user);
    }
}
